<template>
  <div>
    <h1>动态路由的匹配</h1>
  </div>
</template>

<script>
import { asyncRoutes } from '@/router/index'
export default {
  created() {
    console.log(asyncRoutes)
    const menus = this.$store.state.user.UserInfo.roles.menus
    console.log(menus)
    const result = asyncRoutes.filter(item => {
      return menus.includes(item.name)
    })
    console.log(15, result)
  }
}
</script>

<style>

</style>
